package com.example.javaairportflightanalysis.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.example.javaairportflightanalysis.common.ApiRestResponse;
import com.example.javaairportflightanalysis.service.BaseApueService;
import com.example.javaairportflightanalysis.service.BaseBllsService;
import com.github.pagehelper.PageInfo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.text.ParseException;
/**
 * @author shen
 */
@RestController
@RequestMapping("/baseapue")
@CrossOrigin(origins = "*",maxAge = 3600)
public class BaseApueController {
    @Resource
    BaseApueService baseApueService;

    @GetMapping("/aiso")
    public ApiRestResponse getAiso(@RequestParam Integer pageNum, @RequestParam Integer pageSize) throws ParseException {
        PageInfo aiso = baseApueService.getAiso(pageNum, pageSize);
        return ApiRestResponse.success(aiso);
    }
    @GetMapping("selectAiso")
    public ApiRestResponse selectAiso( Integer pageNum,  Integer pageSize, String cnnm, String ddtm) throws ParseException {
        PageInfo aiso = baseApueService.selectAiso(pageNum, pageSize,cnnm,ddtm);
        return ApiRestResponse.success(aiso);
    }
}
